package com.daidai.controller;

import com.daidai.dao.CustomerMapper;
import com.daidai.dao.OrderMapper;
import com.daidai.domain.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("t")
public class TestController {
    @Autowired
    CustomerMapper mapper;
    @Autowired
    OrderMapper orderMapper;

    @GetMapping("/")
    public String getAll() {
        List<Order> allOrder = orderMapper.getAllOrder();
        return allOrder.toString();

    }

}
